using UniversalAdminSystem.Application.LogManagement.DTOs;
using UniversalAdminSystem.Application.Common.Results;

namespace UniversalAdminSystem.Application.LogManagement.Interfaces;

public interface ILogManagementAppService
{
    /// <summary>
    /// 获取所有日志
    /// </summary>
    Task<Result<IEnumerable<LogEntryDto>>> GetAllLogsAsync();

    /// <summary>
    /// 根据ID获取日志
    /// </summary>
    Task<Result<LogEntryDto?>> GetLogByIdAsync(Guid id);

    /// <summary>
    /// 创建日志
    /// </summary>
    Task<Result<LogEntryDto>> CreateLogAsync(LogCreateDto createDto);

    /// <summary>
    /// 根据级别获取日志
    /// </summary>
    Task<Result<IEnumerable<LogEntryDto>>> GetLogsByLevelAsync(string level);

    /// <summary>
    /// 根据用户获取日志
    /// </summary>
    Task<Result<IEnumerable<LogEntryDto>>> GetLogsByUserAsync(Guid userId);

    /// <summary>
    /// 根据日期范围获取日志
    /// </summary>
    Task<Result<IEnumerable<LogEntryDto>>> GetLogsByDateRangeAsync(DateTime start, DateTime end);

    /// <summary>
    /// 根据来源获取日志
    /// </summary>
    Task<Result<IEnumerable<LogEntryDto>>> GetLogsBySourceAsync(string source);

    /// <summary>
    /// 删除日志
    /// </summary>
    Task<Result> DeleteLogAsync(Guid id);

    /// <summary>
    /// 清空所有日志
    /// </summary>
    Task<Result> ClearLogsAsync();
} 